package cn.com.api.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_user_role;

import cn.com.api.mapper.ApiT_user_roleMapper;

import cn.com.api.service.ApiT_user_roleService;
import cn.com.api.service.impl.base.T_user_roleServiceImplBase;

/**
 * 
 **/
@Service
public class ApiT_user_roleServiceImpl extends T_user_roleServiceImplBase implements ApiT_user_roleService{
	@Autowired
	private ApiT_user_roleMapper apiT_user_roleMapper;

	@Override
	public boolean isHaveStationHeadRole() {
		ApiT_user_role stationRole = apiT_user_roleMapper.getStationRole();
		if (stationRole == null){
			return false;
		}else {
			return true;
		}
	}

	@Override
	public boolean isHaveStationHeadRole(Integer roleId) {
		ApiT_user_role stationRole = apiT_user_roleMapper.getStationRole();
		if (stationRole == null){
			return false;
		}else {
			if (stationRole.getRole_id().intValue() == roleId.intValue()){
				return false;
			}else{
				return true;
			}
		}
	}

	@Override
	public ApiT_user_role getStationRole() {
		return apiT_user_roleMapper.getStationRole();
	}
    
	
 
}


